<h1>Editing <%= @view_name %></h1>
<%% if @parent_entity %>
  <form action="/<%%= @parent_entity %>/<%%= params[:id] %>/<%= @view_name %>/<%%= params[:id] %>" method="post" accept-charset="utf-8">
<%% else %>
  <form action="/<%= @view_name %>/<%%= params[:id] %>" method="post" accept-charset="utf-8">
<%% end %>
	<input type="hidden" id="_method" name="_method" value="put" />
	<% @html_tags.each do |key, value| %>
		<p>
			<label for="<%= key %>"><%= key.capitalize %></label><br />
			<input type="<%= value %>" name="<%= "#{@view_name}[#{key}]" %>" value="<%%= <%= "@#{@view_name}.#{key}" %> %>" id="<%= "#{@view_name}_#{key}" %>">
		</p>		
	<% end %>
	<p><input type="submit" value="Edit &rarr;"></p>
</form>